import itchat
import requests
url="http://www.tuling123.com/openapi/api"
key="720b8495c39f40ac92284c5d6b3d1dd7"
 
@itchat.msg_register("Text")
def text_reply(msg):
    return get_reply(msg["Text"])
 
def get_reply(msg):
    print(msg)
    response=requests.post(url+"?key="+key+"&info="+msg).json()
    print(response)
    return response.get("text")
 
itchat.auto_login(hotReload=True)
itchat.run()
